package com.ziyueyuwen.xiniao.dao;

import com.ziyueyuwen.xiniao.bean.ZyClassInfo;
import com.ziyueyuwen.xiniao.bean.vo.ZyClassVO;
import com.ziyueyuwen.xiniao.enums.ClassStatusEnum;
import com.ziyueyuwen.xiniao.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * @author wancheng
 */
public interface ZyClassInfoMapper extends BaseMapper<ZyClassInfo>{
    /**
     * 获取班级
     * @param studentAccount
     * @return
     */
    List<ZyClassVO> getClassAdapterByStudentAccount(@Param("studentAccount") String studentAccount);

    /**
     * 获取班级
     * @param courseId
     * @param ifFilterExpireData
     * @return
     */
    List<ZyClassVO> getByCourseId(@Param("courseId") Integer courseId,
                                  @Param("ifFilterExpireData") Boolean ifFilterExpireData);

    /**
     * 获取班级
     * @param userAccount
     * @param status
     * @param queryData
     * @param ifTeacher
     * @return
     */
    List<ZyClassVO> getByUserAccount(@Param("userAccount") String userAccount,
                                     @Param("status") ClassStatusEnum status,
                                     @Param("queryData") String queryData,
                                     @Param("ifTeacher")Boolean ifTeacher);

    /**
     * 获取最近的班级
     * @param courseId
     * @param studentAccount
     * @return
     */
    ZyClassInfo getStudentRecentlyClass(@Param("courseId") Integer courseId,@Param("studentAccount") String studentAccount);

    /**
     * 获取学生所在的班级,包括历史记录
     * @param studentAccount
     * @return
     */
    List<ZyClassVO> getClassRecord(String studentAccount);
}